import {} from 'react'
import { PDFTemplateSchema } from '@components/schema/pdf'
import style from './index.module.less'

interface Props {
  active: boolean
  data: PDFTemplateSchema
  selectHandle: (id: string) => void
}

function Main ({ active, data, selectHandle }: Props) {
  const className = [style['menu-option']]
  if (active) {
    className.push(style.active)
  }
  return (
    <div className={className.join(' ')}><span onClick={() => selectHandle(data.id)}>{data.title || '无'}</span></div>
  )
}

export default Main